<?php
		include("session.inc");	
		include("dbconn.inc");
		include("dbfuc.inc");			
		$user=$_SESSION["user"];
		$curid=$_SESSION["curid"];
		$dbconnection=$_SESSION["dbconnection"];		
	if(session_is_registered("dbconnection") )
	{
	
?>
<html>
<head>
<title>inner</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
.style1 {	font-size: 9px;
	font-family: Geneva, Arial, Helvetica, sans-serif;
	font-weight: bold;
}
.style7 {font-family: Geneva, Arial, Helvetica, sans-serif}
-->
</style>
<link href="stylesheet.css" rel="stylesheet" type="text/css">
</head>
<body bgcolor="#FFFFFF">
<!-- ImageReady Slices (inner.psd) -->
<table id="Table_01" width="1003" border="0" cellpadding="0" cellspacing="0">
	<tr>
		<td colspan="10"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="1003" height="167">
          <param name="movie" value="images/inner_header.swf">
          <param name="quality" value="high">
          <embed src="images/inner_header.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="1003" height="167"></embed>
	    </object></td>
	</tr>
	<tr>
		<td rowspan="2">
			<img src="images/inner_02.jpg" width="220" height="29" alt=""></td>
		<td rowspan="2">
			<img src="images/inner_03.jpg" width="98" height="29" alt=""></td>
		<td>
			<img src="images/inner_04.jpg" width="44" height="6" alt=""></td>
		<td rowspan="2">
			<img src="images/inner_05.jpg" width="47" height="29" alt=""></td>
		<td rowspan="2">
			<img src="images/inner_06.jpg" width="54" height="29" alt=""></td>
		<td rowspan="2">
			<img src="images/inner_07.jpg" width="102" height="29" alt=""></td>
		<td rowspan="2">
			<img src="images/inner_08.jpg" width="96" height="29" alt=""></td>
		<td rowspan="2">
			<img src="images/inner_09.jpg" width="124" height="29" alt=""></td>
		<td rowspan="2">
			<img src="images/inner_10.jpg" width="106" height="29" alt=""></td>
		<td rowspan="2">
			<img src="images/inner_11.jpg" width="112" height="29" alt=""></td>
	</tr>
	<tr>
		<td>
			<img src="images/inner_12.jpg" width="44" height="23" alt=""></td>
	</tr>
	<tr>
		<td height="19" background="images/inner_15.jpg">&nbsp;</td>
		<td colspan="9" rowspan="2" valign="top" bgcolor="#FFFFFF"><p>&nbsp;</p>
          <table width="98%" align="center" cellpadding="0" cellspacing="0">
            <tr>
              <td><?php
		if(($user!="") && (($curid!="") || ($curid!=0)))
		{
			$sql="";
?>		
<?php	
		//echo $user;
		$sql="select D_JOIN,d_expiry,c_fname from mlm_master b ,mlm_address_dtl a  where b.pn_id=a.n_id and pn_id=$curid ";
		$result=mysql_query($sql);
		$rownum=mysql_num_rows($result);
		if($rownum >0)
		{
			$rownum=$rownum-1;
			$joindate=mysql_result($result,$rownum,"D_JOIN");
			$expiredate=mysql_result($result,$rownum,"d_expiry");
			$c_fname=mysql_result($result,$rownum,"c_fname");
			
		}

		}

?> 
<form name="form" method="post" action="password_update.php" >
  <br>
  <table width="494" border="1" align="center" cellpadding="2" cellspacing="4" bordercolor="#999999" bgcolor="#FFFFFF">
    <tr>
      <td height="30" colspan="3" bgcolor="#CCCCCC"><div align="center"><span class="style20">Change Password </span></div></td>
    </tr>
    <tr bgcolor="#FFFFFF">
      <td width="168" height="30"><div align="right" class="style16"><span class="style6">Old Password</span></div></td>
      <td width="5" height="30" class="style25">:</td>
      <td width="281" height="30"><span class="style16">
        <label>
        <input name="oldpassword" type="password" id="oldpass">
        </label>
      </span></td>
    </tr>
    <tr bgcolor="#FFFFFF">
      <td height="30" class="style22"><div align="right" class="style16">New Password </div></td>
      <td height="30" class="style20"><div align="center" class="style16">:</div></td>
      <td height="30"><span class="style16">
        <label>
        <input name="newpassword" type="password" id="newpass">
        </label>
      </span></td>
    </tr>
    <tr bgcolor="#FFFFFF">
      <td height="30" class="style22"><div align="right" class="style16">Confirm Password </div></td>
      <td height="30" class="style20"><div align="center" class="style16">:</div></td>
      <td height="30"><span class="style16">
        <label>
        <input name="confirmpassword" type="password" id="confirmpass">
        </label>
      </span></td>
    </tr>
    <tr bgcolor="#FFFFFF">
      <td height="30" class="style22"><div align="right" class="style16">Account changing pin</div></td>
      <td height="30" class="style20"><div align="center" class="style16">:</div></td>
      <td height="30"><span class="style16">
        <select name="pin1" id="pin1" style=" BORDER-RIGHT: 1px solid; BORDER-TOP: 1px solid; BORDER-LEFT: 1px solid; COLOR: #000000; BORDER-BOTTOM: 1px solid; ">
          <option value="none">-NA-</option>
          <?php
			 		$acpin1="";
			 		for($i=0; $i<=9;$i++)
			  		{
					if($i>9)
					$acpin1=$i;
					else
					$acpin1=$i;
					if($pin1==$i)  {
			    	?>
          <option value="<?php echo $acpin1 ?>" selected="selected"><strong> <?php echo $acpin1 ?> </strong></option>
          <?php
			  		}
					else
					{
					?>
          <option value="<?php echo $acpin1 ?>"><strong> <?php echo $acpin1 ?> </strong></option>
          <?php
					 }
					 }
			 		?>
        </select>
        <select name="pin2" id="pin2" style=" BORDER-RIGHT: 1px solid; BORDER-TOP: 1px solid; BORDER-LEFT: 1px solid; COLOR: #000000; BORDER-BOTTOM: 1px solid; ">
          <option value="none">-NA-</option>
          <?php
			 		$acpin2="";
			 		for($i=0; $i<=9;$i++)
			  		{
					if($i>9)
					$acpin2=$i;
					else
					$acpin2=$i;
					if($pin2==$i)  {
			    	?>
          <option value="<?php echo $acpin2 ?>" selected="selected"><strong> <?php echo $acpin2 ?> </strong></option>
          <?php
			  		}
					else
					{
					?>
          <option value="<?php echo $acpin2 ?>"><strong> <?php echo $acpin2 ?> </strong></option>
          <?php
					 }
					 }
			 		?>
        </select>
        <select name="pin3" id="pin3" style=" BORDER-RIGHT: 1px solid; BORDER-TOP: 1px solid; BORDER-LEFT: 1px solid; COLOR: #000000; BORDER-BOTTOM: 1px solid; ">
          <option value="none">-NA-</option>
          <?php
			 		$acpin3="";
			 		for($i=0; $i<=9;$i++)
			  		{
					if($i>9)
						$acpin3=$i;
					else
						$acpin3=$i;
					if($pin3==$i)  {
			    	?>
          <option value="<?php echo $acpin3 ?>" selected="selected"><strong> <?php echo $acpin3 ?> </strong></option>
          <?php
			  		}
					else
					{
					?>
          <option value="<?php echo $acpin3 ?>"><strong> <?php echo $acpin3 ?> </strong></option>
          <?php
					 }
					 }
			 		?>
        </select>
        <select name="pin4" id="pin4" style=" BORDER-RIGHT: 1px solid; BORDER-TOP: 1px solid; BORDER-LEFT: 1px solid; COLOR: #000000; BORDER-BOTTOM: 1px solid; ">
          <option value="none">-NA-</option>
          <?php
			 		$acpin4="";
			 		for($i=0; $i<=9;$i++)
			  		{
					if($i>9)
					$acpin4=$i;
					else
					$acpin4=$i;
					if($pin4==$i)  {
			    	?>
          <option value="<?php echo $acpin4 ?>" selected="selected"><strong> <?php echo $acpin4 ?> </strong></option>
          <?php
			  		}
					else
					{
					?>
          <option value="<?php echo $acpin4 ?>"><strong> <?php echo $acpin4 ?> </strong></option>
          <?php
					 }
					 }
			 		?>
        </select>
        <font face="Verdana, Arial, Helvetica, sans-serif" size="1"><span class="style27">*</span></font> </span></td>
    </tr>
    <tr bgcolor="#FFFFFF">
      <td height="30" colspan="3" class="style23">&nbsp;</td>
    </tr>
    <tr bgcolor="#FFFFFF">
      <td height="30" colspan="3" class="style23"><div align="center" class="style16">
          <input name="Submit2" type="submit" class="style27" value="Change Password">
      </div></td>
    </tr>
  </table>
</form></td>
            </tr>
          </table>          
          <p>&nbsp;</p>
</td>
	</tr>
	<tr>
		<td valign="top" background="images/inner_15.jpg"><table width="95%" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td><div class="arrowlistmenu">
                <ul>
                  <li><a href="validation_success.php" class="style1 style7">Control Panal  </a></li>
                  <li><a href="registration_step1.php" class="style1">Registration</a></li>
                  <li><a href="geneology.php" class="style1">Geneology </a></li>
                  <li><a href="amount_transfer.php" class="style1">Amount Transfer  </a></li>
                  <li><a href="amount_transfer_details.php" class="style1">Transaction Details  </a></li>
                  <li><a href="pindetails.php" class="style7">Received Coupon Details  </a></li>
				  <li><a href="user_profile.php" class="style7">View Profile   </a></li>
				  <li><a href="change_password.php" class="style7">Password Change </a></li>
				  <li><a href="logout.php" class="style7">Logout  </a></li>
                </ul>
            </div></td>
          </tr>
        </table>	    <p>&nbsp;</p></td>
	</tr>
	<tr>
		<td colspan="10">
			<img src="images/inner_16.jpg" width="1003" height="23" alt=""></td>
	</tr>
</table>
<!-- End ImageReady Slices -->
</body>
</html>

<?php
	}
	else
	{
		$errormsg="Your session is expeired. Please login again.";
		header("location: index.php?error=$errormsg");
	}
?>	
